/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.DesignPatterns.structural.decorator.conf;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.DesignPatterns.structural.decorator.Animal;
import za.ac.cput.DesignPatterns.structural.decorator.GrowelDirector;
import za.ac.cput.DesignPatterns.structural.decorator.LegDecorator;
import za.ac.cput.DesignPatterns.structural.decorator.LivingAnimal;
import za.ac.cput.DesignPatterns.structural.decorator.WingDecorator;

/**
 *
 * @author Nashief
 */
@Configurable
public class DecoratorConf {
    Animal animal=new LivingAnimal();
   //Animal a= new WingDecorator(animal);
    
    @Bean 
    public LivingAnimal livingAnimal(){
    return new LivingAnimal();
    }
   
     @Bean 
    public WingDecorator wingDecorator(){

         return new WingDecorator(animal);
    }
    
    
    
    @Bean  
    public LegDecorator legDecorator(){
    return new LegDecorator(animal);
    }
   
    
    @Bean 
    public GrowelDirector growelDirector(){
    return new GrowelDirector(animal);
    
    }
    
    
    
}
